#ifndef __THREAD_H
#define __THREAD_H
#include "noncopyable.hpp"
#include <pthread.h>
#include <functional>
namespace moqi
{
using ThreadCallback=std::function<void()>;
class Thread:public Noncopyable
{
public:
    Thread(ThreadCallback && cb);
    void start();
    void join();
private:
    static void *thread_start(void *);
private:
    pthread_t _pthread;
    bool _isRun;
    ThreadCallback  _cb;    
};
}
#endif
